public class Test {

    public static void main(String[] args) {

        BinaryTree binarytree = new BinaryTree();
        BinaryTree.TreeNode root = binarytree.creatTree();

        System.out.print("前序遍历：");
        binarytree.preOrder(root);
        System.out.println();

        System.out.print("中序遍历：");
        binarytree.inOrder(root);
        System.out.println();

        System.out.print("后序遍历：");
        binarytree.postOrder(root);
        System.out.println();


        System.out.println("节点个数为：" + binarytree.size(root));

        System.out.println("叶子节点个数为：" + binarytree.getLeafNodeCount(root));

        System.out.println("获取第k层的结点" + binarytree.getKLeveNodeCount(root, 4));

        System.out.println("二叉树的层数为;" + binarytree.getHight(root));

    }

}
